package com.example.sqlitedemo.greendao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.example.sqlitedemo.dao.entity.FaceFeature;
import com.example.sqlitedemo.dao.entity.FaceInfoBean;
import com.example.sqlitedemo.dao.entity.HscPicBean;
import com.example.sqlitedemo.dao.entity.ShootPhoto;

import com.example.sqlitedemo.greendao.FaceFeatureDao;
import com.example.sqlitedemo.greendao.FaceInfoBeanDao;
import com.example.sqlitedemo.greendao.HscPicBeanDao;
import com.example.sqlitedemo.greendao.ShootPhotoDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig faceFeatureDaoConfig;
    private final DaoConfig faceInfoBeanDaoConfig;
    private final DaoConfig hscPicBeanDaoConfig;
    private final DaoConfig shootPhotoDaoConfig;

    private final FaceFeatureDao faceFeatureDao;
    private final FaceInfoBeanDao faceInfoBeanDao;
    private final HscPicBeanDao hscPicBeanDao;
    private final ShootPhotoDao shootPhotoDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        faceFeatureDaoConfig = daoConfigMap.get(FaceFeatureDao.class).clone();
        faceFeatureDaoConfig.initIdentityScope(type);

        faceInfoBeanDaoConfig = daoConfigMap.get(FaceInfoBeanDao.class).clone();
        faceInfoBeanDaoConfig.initIdentityScope(type);

        hscPicBeanDaoConfig = daoConfigMap.get(HscPicBeanDao.class).clone();
        hscPicBeanDaoConfig.initIdentityScope(type);

        shootPhotoDaoConfig = daoConfigMap.get(ShootPhotoDao.class).clone();
        shootPhotoDaoConfig.initIdentityScope(type);

        faceFeatureDao = new FaceFeatureDao(faceFeatureDaoConfig, this);
        faceInfoBeanDao = new FaceInfoBeanDao(faceInfoBeanDaoConfig, this);
        hscPicBeanDao = new HscPicBeanDao(hscPicBeanDaoConfig, this);
        shootPhotoDao = new ShootPhotoDao(shootPhotoDaoConfig, this);

        registerDao(FaceFeature.class, faceFeatureDao);
        registerDao(FaceInfoBean.class, faceInfoBeanDao);
        registerDao(HscPicBean.class, hscPicBeanDao);
        registerDao(ShootPhoto.class, shootPhotoDao);
    }
    
    public void clear() {
        faceFeatureDaoConfig.clearIdentityScope();
        faceInfoBeanDaoConfig.clearIdentityScope();
        hscPicBeanDaoConfig.clearIdentityScope();
        shootPhotoDaoConfig.clearIdentityScope();
    }

    public FaceFeatureDao getFaceFeatureDao() {
        return faceFeatureDao;
    }

    public FaceInfoBeanDao getFaceInfoBeanDao() {
        return faceInfoBeanDao;
    }

    public HscPicBeanDao getHscPicBeanDao() {
        return hscPicBeanDao;
    }

    public ShootPhotoDao getShootPhotoDao() {
        return shootPhotoDao;
    }

}
